package br.com.myps3t;

import java.util.ArrayList;
import java.util.List;
import android.graphics.Bitmap;

public class Perfil {

	private String avatarURLHigh = "";
	private String avatarURLLow = "";
	
	private Bitmap imgAvatarHigh = null;
	private Bitmap imgAvatarLow = null;

	private String userName = "";
	private String userMessage = "";

	private String registerDate = "";
	
	private int trophyPlatinum = 0;
	private int trophyGold = 0;
	private int trophySilver = 0;
	private int trophyBronze = 0;

	private int userLevel = 0;
	private int userLevelPorc = 0;

	private int userPosGeral = 0;
	private int userPosDif = 0;
	private int userPosPlat = 0;
	
	private List<UserTrophies> lastTrophies = null;
	
	public String getAvatarURLHigh() {
		return avatarURLHigh;
	}

	public void setAvatarURLHigh(String avatarURLHigh) {
		this.avatarURLHigh = avatarURLHigh;
	}
	
	public String getAvatarURLLow() {
		return avatarURLLow;
	}

	public void setAvatarURLLow(String avatarURLLow) {
		this.avatarURLLow = avatarURLLow;
	}

	public Bitmap getImgAvatarHigh() {
		return imgAvatarHigh;
	}

	public void setImgAvatarHigh(Bitmap imgAvatarHigh) {
		this.imgAvatarHigh = imgAvatarHigh;
	}

	public Bitmap getImgAvatarLow() {
		return imgAvatarLow;
	}

	public void setImgAvatarLow(Bitmap imgAvatarLow) {
		this.imgAvatarLow = imgAvatarLow;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserMessage() {
		return userMessage;
	}

	public void setUserMessage(String userMessage) {
		this.userMessage = userMessage;
	}

	public String getRegisterDate() {
		return registerDate;
	}

	public void setRegisterDate(String registerDate) {
		this.registerDate = registerDate;
	}

	public int getTrophyPlatinum() {
		return trophyPlatinum;
	}

	public void setTrophyPlatinum(int trophyPlatinum) {
		this.trophyPlatinum = trophyPlatinum;
	}

	public int getTrophyGold() {
		return trophyGold;
	}

	public void setTrophyGold(int trophyGold) {
		this.trophyGold = trophyGold;
	}

	public int getTrophySilver() {
		return trophySilver;
	}

	public void setTrophySilver(int trophySilver) {
		this.trophySilver = trophySilver;
	}

	public int getTrophyBronze() {
		return trophyBronze;
	}

	public void setTrophyBronze(int trophyBronze) {
		this.trophyBronze = trophyBronze;
	}

	public int getTrophySum() {
		return (this.trophyPlatinum + this.trophyGold + this.trophySilver + this.trophyBronze);
	}
	
	public int getUserLevel() {
		return userLevel;
	}
	
	public void setUserLevel(int userLevel) {
		this.userLevel = userLevel;
	}
	
	public int getUserLevelPorc() {
		return userLevelPorc;
	}
	
	public void setUserLevelPorc(int userLevelPorc) {
		this.userLevelPorc = userLevelPorc;
	}
	
	public int getUserPosGeral() {
		return userPosGeral;
	}

	public void setUserPosGeral(int userPosGeral) {
		this.userPosGeral = userPosGeral;
	}

	public int getUserPosDif() {
		return userPosDif;
	}

	public void setUserPosDif(int userPosDif) {
		this.userPosDif = userPosDif;
	}

	public int getUserPosPlat() {
		return userPosPlat;
	}

	public void setUserPosPlat(int userPosPlat) {
		this.userPosPlat = userPosPlat;
	}

	public void addTrophy(UserTrophies trophy) {

		if ( this.lastTrophies == null )
			this.lastTrophies = new ArrayList<UserTrophies>();
		
		this.lastTrophies.add(trophy);
	}

	public List<UserTrophies> getLastTrophies() {
		return lastTrophies;
	}
	
	public int getTotalPoints() {
		
		int totalPoints = 0;
		
		totalPoints = ( ( this.trophyBronze * TrophyType.BRONZE.getPoints() ) + 
				        ( this.trophySilver * TrophyType.SILVER.getPoints() ) +
				        ( this.trophyGold * TrophyType.GOLD.getPoints() ) + 
				        ( this.trophyPlatinum * TrophyType.PLATINUM.getPoints() ) );

		return totalPoints;
		
	}
	
}
